<!DOCTYPE html>
<html>
<head>
    <title>一切都是对象</title>
    <meta charset="utf-8"/>
    <script src="../../js/jquery-1.10.1.min.js"></script>
    <script>
        function show(x) {

            console.log(typeof(x));    // undefined
            console.log(typeof(10));   // number
            console.log(typeof('abc')); // string
            console.log(typeof(true));  // boolean

            console.log(typeof(function () { }));  //function

            console.log(typeof([1, 'a', true]));  //object
            console.log(typeof ({ a: 10, b: 20 }));  //object
            console.log(typeof (null));  //object
            console.log(typeof (new Number(10)));  //object
            console.log("GGG:"+ typeof ($));  // function
        }
        show();

        $(function(){
            alert("$(function()");
            console.log("GGG:"+ typeof ($));
            console.log($.trim(" ABC "));
        });

        $().ready(function(){
            alert("$().ready");
            console.log("HHH:" + typeof ($));  // function
            console.log($.trim(" ABC "));
        });

        $(document).ready(function(){
            alert("$(document).ready");
        });
    </script>
</head>
<body>
    <p>一切都是对象</p>
</body>
</html>